/*Using LVGL with Arduino requires some extra steps:
 *Be sure to read the docs here: https://docs.lvgl.io/master/get-started/platforms/arduino.html  */

#include <lvgl.h>
#include <Arduino.h>
#include "./dev/screen.h"
#include "./dev/touch.h"
#include "serial_cli.h"
#include "ui_funcs.hpp"
#include "./ui/ui.h"
#include "./dev/stepper.hpp"
#include "./dev/filesystem.h"
#include "./dev/network.hpp"
#include "macro.hpp"
// #include <demos/lv_demos.h>


 void setup()
 { 
    motor_disable();
    init_print();
    filesystem_init();
    load_macro();
    wifi_initalize_from_file();
    motor_init_params();
    screen_setup();
    touch_init();
    touch_cal_setup();
    ui_init();
    ui_init_params();
    lv_timer_handler();
    smooth_on();
    motor_enable();
 }
 
 void loop()
 {
  lv_timer_handler(); /* let the GUI do its work */
  serial_cli_loop();
  macro_looper();
//   delay( 5 );
 }
 